Unlike x86 and apparently ia64, PowerPC delivers timer interrupts as a
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 15 Mar 2006 10:06:45 +0000 (11:06 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 15 Mar 2006 10:06:45 +0000 (11:06 +0100)
different exception than device interrupts. For PowerPC Xen, we emulate this
exception rather than delivering timer events as virtual IRQs. This patch
introduces no functional changes for x86 and ia64, but is a required change
for xen/arch/ppc.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
xen/arch/ia64/xen/xentime.c
xen/arch/x86/time.c
xen/common/schedule.c
xen/include/xen/time.h

index 45ffcebff155fce9810931dbe2dace83459e901d..f17e786cbf4e949097f05e0fdc2d36528aca2f15 100644 (file)
@@ -258,4 +258,8 @@ int reprogram_timer(s_time_t timeout)
        return 1;
 }
 
+void send_timer_event(struct vcpu *v)
+{
+       send_guest_virq(v, VIRQ_TIMER);
+}
 
index 59fa0bfe04a8412073b9197e8c824bce76d88d10..286df06a6fd698ce0e0dafd40ffa06052c4b576e 100644 (file)
@@ -923,6 +923,11 @@ void __init early_time_init(void)
     setup_irq(0, &irq0);
 }
 
+void send_timer_event(struct vcpu *v)
+{
+    send_guest_virq(v, VIRQ_TIMER);
+}
+
 /*
  * Local variables:
  * mode: C
index 78863e58250d9af0c92fa7485e797214136df72b..9eaa29847f5f5d095ae1d6826cc92e87a787c5b6 100644 (file)
@@ -574,7 +574,7 @@ static void __enter_scheduler(void)
     {
         update_dom_time(next);
         if ( next->sleep_tick != schedule_data[cpu].tick )
-            send_guest_virq(next, VIRQ_TIMER);
+            send_timer_event(next);
     }
 
     TRACE_4D(TRC_SCHED_SWITCH,
@@ -610,7 +610,7 @@ static void t_timer_fn(void *unused)
     if ( !is_idle_vcpu(v) )
     {
         update_dom_time(v);
-        send_guest_virq(v, VIRQ_TIMER);
+        send_timer_event(v);
     }
 
     page_scrub_schedule_work();
@@ -624,7 +624,7 @@ static void dom_timer_fn(void *data)
     struct vcpu *v = data;
 
     update_dom_time(v);
-    send_guest_virq(v, VIRQ_TIMER);
+    send_timer_event(v);
 }
 
 /* SCHEDOP_poll timeout callback. */
index eec7f4082b266f98aa75fe8dc37f750d690f5bdb..3a31af01126e240345dd514911669decd3e3b85c 100644 (file)
@@ -59,6 +59,8 @@ extern void update_dom_time(struct vcpu *v);
 extern void do_settime(
     unsigned long secs, unsigned long nsecs, u64 system_time_base);
 
+extern void send_timer_event(struct vcpu *v);
+
 #endif /* __XEN_TIME_H__ */
 
 /*